<!--<!DOCTYPE html>-->
<!--<html lang="en" xmlns:th="http://www.thymeleaf.org">-->
<!--<head>-->
<!--    <meta charset="UTF-8">-->
<!--    <title>Title</title>-->
<!--</head>-->
<!--<body>-->
<!--<h1>这是添加页面</h1>-->
<!--<p>请输入员工信息</p>-->

<!--<form method="post" action="/add">-->
<!--    name:<input type="text" name="name" th:value="${person?.name}" ></input><br>-->
<!--    password:<input type="text" name="password" th:value="${person?.password}"></input><br>-->
<!--    提交按钮:<input type="submit" value="添加"></input><br>-->
<!--</form>-->
<!--</body>-->
<!--</html>-->

<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>添加人员 - 人员管理系统</title>
    <link rel="stylesheet" href="/css/common.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body class="form-page">
<div class="page-container">
    <header>
        <a href="/addressList" class="back-btn">
            <i class="fas fa-arrow-left"></i>
        </a>
        <h1>添加人员信息</h1>
    </header>

    <form method="post" th:action="@{/add}" th:object="${person}" class="data-form">
        <div class="form-group">
            <label for="name">
                <i class="fas fa-user"></i> 姓名
            </label>
            <input type="text" id="name" name="name" th:value="*{name}" placeholder="请输入姓名" required>
        </div>
        <div class="form-group">
            <label for="password">
                <i class="fas fa-lock"></i> 密码
            </label>
            <input type="password" id="password" name="password" th:value="*{password}" placeholder="请输入密码" required>
        </div>
        <div class="error-message" th:if="${error != null}" th:text="${error}"></div>
        <div class="form-actions">
            <input type="submit" value="确认添加">
            <input type="reset" value="重新填写">
        </div>
    </form>
</div>
</body>
</html>
